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,GACdlB,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQ,QAASa,GAGnEd,OAAMe,O","sources":["webpack://_N_E/?702d","webpack://_N_E/./api/inappAxios.js","webpack://_N_E/./styles/inapp/stylesheet.ts","webpack://_N_E/./components/layouts/inappLayout.tsx","webpack://_N_E/./api/inapp/index.js","webpack://_N_E/./hooks/policy/useGetPolicyArchiveList.ts","webpack://_N_E/./components/legal/PrivacyPolicySelect.tsx","webpack://_N_E/./hooks/policy/usePolicy.ts","webpack://_N_E/./pages/legal/[type].tsx","webpack://_N_E/./styles/website/Legal.module.css","webpack://_N_E/../../node_modules/next/error.js","webpack://_N_E/../../node_modules/next/node_modules/@swc/helpers/src/_async_to_generator.mjs"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/legal/[type]\",\n function () {\n return require(\"private-next-pages/legal/[type].tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/legal/[type]\"])\n });\n }\n ","import axios from \"axios\";\nimport { Cookies } from \"react-cookie\";\nimport { settings } from \"../configs/settings\";\n\nconst instance = axios.create({\n baseURL: settings.API_DOMAIN\n});\n\nconst cookies = new Cookies();\nconst appToken = cookies.get(\"elecle-access-token\");\n\nif (appToken) {\n instance.defaults.headers.common.Authorization = `Bearer ${appToken}`;\n}\n\nexport default instance;\n","export default {\n fonts: {\n \"text-body-1\": {\n color: \"#666666\",\n fontSize: \"14px\"\n }\n },\n colors: {\n white: \"rgba(255,255,255,1)\",\n socarElecleBlue100: \"#E5F4FF\",\n socarElecleBlue200: \"#C5E5FF\",\n socarElecleBlue500: \"#008CFF\",\n socarElecleBlue600: \"#0081EB\",\n gray100: \"#F5F6F7\",\n gray200: \"#E9EBEE\",\n gray300: \"#C5C8CE\",\n gray400: \"#9FA1A9\",\n gray500: \"#646F7C\",\n gray600: \"#374553\",\n gray700: \"#000000\"\n }\n};\n","import styled, { ThemeProvider, createGlobalStyle } from \"styled-components\";\nimport theme from \"@/styles/inapp/stylesheet\";\n\nexport default function Layout({ children }: { children: React.ReactNode }) {\n return (\n \n \n {children}\n \n );\n}\n\ntype ContainerProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nconst Container = styled.div`\n height: 100%;\n`;\n\nconst GlobalStyle = createGlobalStyle`\n* {\n -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */\n font-family: \"Noto Sans KR\";\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\n supported by Chrome, Edge, Opera and Firefox */\n}\n`;\n","import axios from \"@/api/inappAxios\";\n\nexport const getPolicyArchivesListApi = (type) => {\n return axios.get(`/v1/operation/policy/${type}/archive`);\n};\n\nexport const getPolicyApi = (type, params) => {\n return axios.get(`v1/operation/policy/${type}`, { params });\n};\n","import { useCallback, useState } from \"react\";\nimport { getPolicyArchivesListApi } from \"@/api/inapp\";\n\nexport interface DocumentData {\n name: string;\n key: string;\n}\n\nexport interface Response {\n document_list: DocumentData[];\n}\n\nconst useGetPolicyArchiveList = () => {\n const [policyArchiveList, setPolicyArchiveList] = useState(\n []\n );\n\n const getPolicyArchives = async (type: string) => {\n const data = await getPolicyArchivesListApi(type).then(\n (response) => response.data.document_list\n );\n setPolicyArchiveList(data);\n };\n\n return {\n policyArchiveList,\n getPolicyArchives: useCallback(getPolicyArchives, [])\n };\n};\n\nexport default useGetPolicyArchiveList;\n","import type { Dispatch, FormEvent, SetStateAction } from \"react\";\nimport styled from \"styled-components\";\n\ntype Props = {\n options: {\n name: string;\n key: string;\n }[];\n selectedArchive: string;\n setSelectedArchive: Dispatch>;\n};\n\nfunction PrivacyPolicy({\n options,\n selectedArchive,\n setSelectedArchive\n}: Props) {\n const handleChangeSelect = (e: FormEvent) => {\n setSelectedArchive(options[e.currentTarget.selectedIndex].key);\n };\n\n return (\n \n 시행/변경일자\n \n \n {options.map((option) => (\n \n {option.name}\n \n ))}\n \n \n \n );\n}\n\ntype StyledSelectProps = {\n onChange: (e: FormEvent) => void;\n defaultValue: string;\n children: React.ReactNode;\n};\n\nconst StyledContainer = styled.div`\n display: flex;\n padding: 8px;\n background: ${(props) => props.theme.colors.gray100};\n border-radius: 8px;\n align-items: center;\n`;\n\nconst StyledLabelAdornment = styled.div`\n font-weight: bold;\n width: 100px;\n font-size: 14px;\n padding: 8px;\n`;\n\nconst StyledSelectContainer = styled.div`\n position: relative;\n flex-grow: 1;\n &::after {\n content: \"\";\n position: absolute;\n display: inline-block;\n width: 0px;\n height: 0px;\n right: 16px;\n top: 50%;\n margin-top: -2px;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid #000;\n }\n`;\n\nconst StyledSelect = styled.select`\n width: 100%;\n padding: 8px;\n border: none;\n background: transparent;\n box-sizing: border-box;\n appearance: none;\n &:focus,\n &:focus-visible {\n outline: none;\n }\n`;\n\nexport default PrivacyPolicy;\n","import { useCallback, useState } from \"react\";\nimport { getPolicyApi } from \"@/api/inapp\";\n\nexport interface PolicyResponse {\n document: string;\n}\n\nconst useGetPolicy = () => {\n const [policy, setPolicy] = useState(null);\n\n const getPolicy = async (type: string, archive?: string) => {\n const params = archive ? { archived: archive } : {};\n const data = await getPolicyApi(type, params).then(\n (response) => response.data\n );\n setPolicy(data);\n };\n return { policy, setPolicy, getPolicy: useCallback(getPolicy, []) };\n};\n\nexport default useGetPolicy;\n","import ErrorPage from \"next/error\";\nimport { useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport usePolicies from \"../../hooks/policy/useGetPolicyArchiveList\";\nimport Layout from \"@/components/layouts/inappLayout\";\nimport PrivacyPolicySelect from \"@/components/legal/PrivacyPolicySelect\";\nimport usePolicy from \"@/hooks/policy/usePolicy\";\nimport styles from \"@/styles/website/Legal.module.css\";\n\nexport type LegalType =\n | \"privacy-policy\"\n | \"terms-of-service\"\n | \"terms-of-store-product\"\n | \"lease-product\"\n | \"personal-information-collection-and-usage\"\n | \"location-based\"\n | \"marketing-receive\";\n\nexport async function getStaticPaths() {\n const paths = [\n \"privacy-policy\",\n \"terms-of-service\",\n \"terms-of-store-product\",\n \"lease-product\",\n \"personal-information-collection-and-usage\",\n \"location-based\",\n \"marketing-receive\"\n ].map((type) => ({\n params: { type }\n }));\n\n return {\n paths,\n fallback: false\n };\n}\n\n// This also gets called at build time\nexport async function getStaticProps({ params }) {\n return {\n props: {\n type: params.type\n }\n };\n}\n\ninterface Props {\n type: LegalType;\n}\n\nexport default function Page({ type }: Props) {\n const isPrivacyPolicy = type === \"privacy-policy\";\n const { policyArchiveList, getPolicyArchives } = usePolicies();\n const { policy, getPolicy } = usePolicy();\n const [selectedArchive, setSelectedArchive] = useState(null);\n\n useEffect(() => {\n if (isPrivacyPolicy) {\n getPolicyArchives(type);\n }\n }, [getPolicyArchives, isPrivacyPolicy, type]);\n\n useEffect(() => {\n getPolicy(type, selectedArchive);\n }, [selectedArchive, getPolicy, type]);\n\n if (type == null) {\n return ;\n }\n return (\n \n \n \n {isPrivacyPolicy && policyArchiveList.length > 0 && (\n \n )}\n \n {policy && (\n \n )}\n \n \n );\n}\ntype LegalProps = {\n dangerouslySetInnerHTML: {\n __html: string;\n };\n};\n\nconst Legal = styled.main`\n padding: 10px;\n table,\n th,\n td {\n color: #121212;\n border: 1px solid #969799;\n border-collapse: collapse;\n }\n td,\n th {\n padding: 9px 7px;\n }\n`;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"legal\":\"Legal_legal__EOiGg\"};","module.exports = require('./dist/pages/_error')\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n"],"names":["window","__NEXT_P","push","instance","axios","baseURL","settings","appToken","Cookies","get","defaults","headers","common","Authorization","fonts","color","fontSize","colors","white","socarElecleBlue100","socarElecleBlue200","socarElecleBlue500","socarElecleBlue600","gray100","gray200","gray300","gray400","gray500","gray600","gray700","Layout","children","ThemeProvider","theme","GlobalStyle","Container","className","styled","createGlobalStyle","getPolicyArchivesListApi","type","getPolicyApi","params","useState","policyArchiveList","setPolicyArchiveList","getPolicyArchives","data","then","response","document_list","useCallback","StyledContainer","props","StyledLabelAdornment","StyledSelectContainer","StyledSelect","options","selectedArchive","setSelectedArchive","onChange","e","currentTarget","selectedIndex","key","defaultValue","map","option","value","name","policy","setPolicy","getPolicy","archive","archived","Page","isPrivacyPolicy","usePolicies","usePolicy","useEffect","ErrorPage","statusCode","div","styles","style","margin","length","PrivacyPolicySelect","Legal","dangerouslySetInnerHTML","__html","document","module","exports","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","error","done","Promise","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined"],"sourceRoot":""}